package com.kkwrite.regimen.provider.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.util.Date;

/**
 * 订单 DO
 *
 * @author Soosky Wang
 * @version 1.0.0
 * @date 2018年7月21日 下午5:37:48
 */
@Entity
@Table(name = "reg_order")
@Getter
@Setter
@ToString(callSuper = true)
public class RegOrderDO extends BaseDO {

    private static final long serialVersionUID = 1270329133090771191L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long orderId;
    private String orderCode;
    /**
     * 微信支付订单号
     */
    private String transactionId;
    private Short orderType;
    private Long userId;
    private Long itemId;
    private Long shopId;
    private Long addressId;
    private String phoneNum;
    private Short orderStatus;
    private Double orderAmount;
    private Integer orderQuantity;
    private Short payStatus;
    /**
     * 支付方式
     */
    private Short payment;
    private Date payStartTime;
    private Date payEndTime;
    private Timestamp serviceStartTime;
    private Timestamp serviceEndTime;
    @Column(name = "is_refund")
    private Short refund;
    private Short refundSate;
    /**
     * 退款单号
     */
    private String refundCode;
    /**
     * 微信退款ID
     */
    private String refundId;
    /**
     * 微信返回的退款成功时间
     */
    private Timestamp refundSuccessTime;
    private Date validTime;
    private Date invalidTime;
    /**
     * 投保状态
     */
    private Short insuredState;
    private Float insuredAmount;
    private String insuredName;
    private String insuredIdCard;
    private Date insuredStartTime;
    private Date insuredEndTime;
    /**
     * 是否预约
     */
    @Column(name = "is_appointment")
    private Short appointment;
    private Date appointmentTime;
    /**
     * 提前预约时间
     */
    private Short appointmentLong;
    /**
     * 是否已评价
     */
    @Column(name = "is_reviewed")
    private Integer reviewed;
    /**
     * 店铺是否已评价
     */
    @Column(name = "is_shop_reviewed")
    private Integer shopReviewed;
}
